﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace SpriteSheetsCreator {
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application {
        private static MainViewModel viewModel = null;

        /// <summary>
        /// A static ViewModel used by the views to bind against.
        /// </summary>
        /// <returns>The MainViewModel object.</returns>
        public static MainViewModel ViewModel {
            get {
                // Delay creation of the view model until necessary
                if (viewModel == null) {
                    viewModel = new MainViewModel();
                    SettingsIO.loadeGuiParams();
                }

                return viewModel;
            }
        }
    }
}
